package com.ubxtech.db.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.Version;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * PK primary key
 * CT CreateTime
 * CB CreateBy
 * VER version
 * @ClassName BaseEntity
 * @Description cml base entity
 * @Author Vanye.Lee
 * @Date 2023-09-27 下午 08:09
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class VersionEntity<PK,CT,VER> extends IdEntity<PK>{

    @TableField(value = "created_time", fill = FieldFill.INSERT)
    protected CT createdTime;

    /**
     * 只能是long,Long,date,int,Integer,Timestamp,LocalDateTime
    */
    @TableField(value = "version")
    @Version
    protected VER version;

}
